package cn.znzz.cjm.feign;

import cn.znzz.cjm.dto.VipCod;
import cn.znzz.cjm.util.AjaxResult;
import feign.hystrix.FallbackFactory;

import javax.validation.Valid;

public class VipCodFallBack implements FallbackFactory<VipCodFeignClient>{
    @Override
    public VipCodFeignClient create(Throwable throwable) {
        return new VipCodFeignClient() {
            @Override
            public AjaxResult register(@Valid VipCod cod) {
                return new AjaxResult().setSuccess(false).setMessage("注册失败");
            }
        };
    }
}
